package com.wlyuan.open.scanner.domain.quotation;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author lijing
 * @description
 */
@Data
public class QuotationRelation implements Serializable {

    private static final long serialVersionUID = -3885081959660339320L;
    @ApiModelProperty("运单id/拼车单id")
    private Long waybillId;

    @ApiModelProperty("1运单，3拼车单")
    private Long waybillType;

    @ApiModelProperty("创建时间")
    private LocalDateTime createAt;

    @ApiModelProperty("创建租户")
    private Long tenantId;

    @ApiModelProperty("是否是拼车子单 1是，0否")
    private Integer isCombine;

    @ApiModelProperty("是否报价，1是，0否")
    private Integer isQuotation;

    @ApiModelProperty("报价时间")
    private LocalDateTime quotationAt;

    private Integer isTemplate;

    private Long id;

    public boolean waybillQuotation() {
        return this.isCombine == 0 && this.isQuotation == 1;
    }

    public boolean combineQuotation() {
        return this.isQuotation == 1;
    }
}
